﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CitizenDiary.Sync.Contract
{
    [DataContract]
    public class HandshakeResponse
    {
        [DataMember]
        public string Token { get; set; }

        [DataMember]
        public SynchronizationCollection SynchronizationItems { get; set; }

        public HandshakeResponse()
        {
            SynchronizationItems = new SynchronizationCollection();
        }

        //[DataContract]
        //public class SynchronizationItem
        //{
        //    [DataContract]
        //    public SynchronizationType Type { get; set; }

        //    [DataContract]
        //    public string ServerSideContent { get; set; }

        //    [DataContract]
        //    public Guid ConflictOwnerID { get; set; }
        //}

        //[DataMember]
        //public IEnumerable<UploadCondidate> UploadCondidates { get; set; }


        //public HandshakeResponse()
        //{
        //    UploadCondidates = new List<UploadCondidate>();
        //}

        //[DataContract]
        //public class UploadCondidate
        //{
        //    [DataMember]
        //    public Guid ID { get; set; }

        //    [DataMember]
        //    public string ServerSideContent { get; set; }

        //    [DataMember]
        //    public Guid ServerSideUpdatedDeviceID { get; set; }

        //    [DataMember]
        //    public UploadMode Mode { get; set; }
        //}

        //[DataContract]
        //public enum UploadMode : int
        //{
        //    Ignore = 0,
        //    Update = 1,
        //    Insert = 2,
        //    Conflict = 3
        //}
    }
}
